
<%@ page import="report.Activity" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title>iPET - Atividades</title>
    </head>
    <body>
       <g:render template="/common/menuActivity" />
       <div id="text">
        <div class="body">
        	<h2>Informações da atividade</h2>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.nature.label" default="Natureza" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "nature")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.theme.label" default="Tema" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "theme")}</td>
                        </tr>
                    	 <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.months.label" default="Meses" /></td>
                            <td valign="top" class="value list">
                                <ul>
                                <g:each in="${activityInstance?.months}" var="s">
                                    <li>${s.toString()}</li>
                                </g:each>
                                </ul>
                            </td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.startDate.label" default="Início" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "startDate")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.endDate.label" default="Fim" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "endDate")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.status.label" default="Status" /></td>
                            <td valign="top" class="value">${activityInstance.statusString()}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.description.label" default="Descri&ccedil;&atilde;o" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "description")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.target.label" default="P&uacute;blico Alvo" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "target")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.reasons.label" default="Justificativa" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "reasons")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.expectedResults.label" default="Resultados Esperados" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "expectedResults")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.actualResults.label" default="Resultados Obtidos" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "actualResults")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.partners.label" default="Colaboradores" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "partners")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.sponsors.label" default="Responsável(eis)" /></td>
                            <td valign="top" class="value list">
                                <ul>
                                <g:each in="${activityInstance.sponsors}" var="s">
                                    <li>${s?.nome}</li>
                                </g:each>
                                </ul>
                            </td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="activity.comments.label" default="Coment&aacute;rios Gerais" /></td>
                            <td valign="top" class="value">${fieldValue(bean: activityInstance, field: "comments")}</td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${activityInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="Editar" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="Remover" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Tem certeza?')}');" /></span>
                </g:form>
            </div>
        </div>
        </div>
    </body>
</html>
